This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h4x3rotab
reviewed
Apr 15, 2021
src/main.rs
Outdated
@@ -53,12 +53,14 @@ type XtClient = subxt::Client<Runtime>; | |||
type PrClient = pruntime_client::PRuntimeClient; | |||
|
|||
const DIEM_CONTRACT_ID: u32 = 5; | |||
const INTERVAL: u64 = 1_000 * 60 * 3; | |||
const INTERVAL: u64 = 1_000 * 60 * 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change it to 15s (1_000 * 15)
src/main.rs
Outdated
@@ -555,6 +555,46 @@ impl DiemBridge { | |||
Err(Error::FailedToGetResponse) | |||
} | |||
} | |||
|
|||
async fn submit_signed_transaction( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
async fn submit_signed_transaction( | |
async fn maybe_submit_signed_transaction( |
src/main.rs
Outdated
if let QueryRespData::GetSignedTransactions { queue_b64 } = resp { | ||
let data = base64::decode(&queue_b64).unwrap(); | ||
let transaction_data: Vec<TransactionData> = Decode::decode(&mut &data[..]).unwrap(); | ||
for td in transaction_data.clone() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
for td in transaction_data.clone() { | |
for td in &transaction_data { |
src/main.rs
Outdated
Comment on lines
98
to
103
//sent_events_key: Option<BytesView>, | ||
//received_events_key:Option<BytesView>, | ||
//sent_events: Option<Vec<EventView>>, | ||
//received_events: Option<Vec<EventView>>, | ||
//transactions: Option<Vec<TransactionView>>, | ||
//account: Option<AccountData>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the comments
src/main.rs
Outdated
received_events: BTreeMap<String, Vec<EventView>>, | ||
transactions: BTreeMap<String, Vec<TransactionView>>, | ||
account: BTreeMap<String, AccountData>, | ||
//balances: Option<Vec<AmountView>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
h4x3rotab
approved these changes
Apr 15, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.